package com.file.controller;


import com.common.entity.Rsp;
import com.file.service.FileServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;


@RestController
public class FileController {

    @Autowired
    FileServiceImpl fileService;


//    @RequireRoles(roles = {"admin","super_admin"},index = 2)
    @PostMapping("/uploadImage")
    public Rsp uploadImage(@RequestParam("image") MultipartFile image, @RequestHeader("userId") String userId,
                           @RequestHeader("roleSign") String roleSign){


        return fileService.uploadImage(image);
    }



}
